I have looked into possible improvements to our CI/CD process and release workflow. I borrowed ideas from Software Configuration Management Patterns by Stephen Berczuk. In this post, I document suggestions and action items for improved CI/CD process.
At Pearson, my team's (CEET) current test suit takes over 2 hours to run. Since it is taking long time, we have a risk of not using the full test suite frequent. It is important to define most critical functionality and implement smoke tests. Smoke tests are not exhaustive tests, it guarantees that most critical functionality is working after development. In addition, during daily testing we can execute our full test suite.
Pre-checkin test suite
Full test suite
We use 'development' branch for active development. Therefore it make sense for us to integrate automated tests configured on that branch. I'm envisioning following workflow the 'development' branch.
When a developer done with a task, he/she go through pre-checkin workflow and submit a pull request. Then reviewer, review and merge the pull request for the 'development' branch. Then jenkins (or other tool) kicks off automated tests on the development branch. In addition, everyday around 7am (subject to change) jenkins kicks off daily testing process. We go through our full test suite during daily testing cycle. Furthermore, jenkins notifies developers on failure in automated testing or daily testing process.
We need to maintain active development during busy BTS (Back to school) season. Therefore we do our minor releases on a different release branch as shown in following diagram. We keep development on 'development' branch until we are ready for the release. When we are ready for the release, we create a release branch. Anything related to release happens on the this branch where as we can keep active development on the 'development' branch. On a later date, if we decide changes we did on the release branch is important for the next release, we merge them back to the ‘development’ branch.
We use separate branch for each minor release, trivial releases on minor release branch.
After running all of our testing at staging, will merge release branch with master so that master is always production ready.
As developers, it is our responsibility to make sure all our pull requests are conflicts free with the 'development' branch and pass all tests.